Moin,
ich melde mich mal zurück und bräuchte ein gedankensprung wie ich diese sache am besten Löse.
Ich lese etwas aus einer Datenbank aus und erhalte ein Array mit folgenden werten.
XML
[["HitHull",
"HitFuel",
"HitAvionics",
"HitEngine1",
"HitEngine2",
"HitEngine",
"HitHRotor",
"HitVRotor",
"HitMissiles",
"HitRGlass",
"HitLGlass",
"HitEngine3",
"HitWinch",
"HitTransmission",
"HitGlass1",
"HitGlass2",
"HitGlass3",
"HitGlass4",
"HitGlass5",
"HitGlass6",
"HitLight",
"HitHydraulics",
"HitGear",
"HitHStabilizerL1",
"HitHStabilizerR1",
"HitVStabilizer1",
"HitTail",
"HitPitotTube",
"HitStaticPort",
"HitStarter1",
"HitStarter2",
"HitStarter3",
"",
"HitTurret",
"HitGun",
"HitTurret",
"HitGun",
"HitTurret",
"HitGun"],
// von hier
["hull_hit","fuel_hit","avionics_hit","engine_1_hit","engine_2_hit","engine_hit","main_rotor_hit","tail_rotor_hit","","","","","slingload0","transmission","","","","","","","","","gear","hstabilizerl1","hstabilizerr1","vstabilizer1","tail boom","pitot tube","static port","starter1","starter2","","light_hitpoint","","","","","",""],
// bis jetzt unnötig kann gelöscht werden
[1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0.0233079,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0377239,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0]]
Alles anzeigen
wie kann ich das nun so Splitten, das ich den ersten Wert mit den ersten Int Wert verknüpfe ?
Habe mir in der Richtung etwas gedacht wie ich das am Ende auslesen mag, wenn es so am sinnvollsten ist.
PHP
$VDStatus = array(
"I_Heli_Transport_02_F" => array(
"HitHull" => array("0" => "NOT DAMAGE", "1" => "DAMAGE"),
"HitEngine1" => array("0" => "NOT DAMAGE", "1" => "DAMAGE")
),
"I_Heli_Transport_01_F" => array(
"HitHull" => array("0" => "NOT DAMAGE", "1" => "DAMAGE"),
"HitEngine1" => array("0" => "NOT DAMAGE", "1" => "DAMAGE")
)
);